using System;
using System.Linq;
using System.Diagnostics.Contracts;

namespace ReactiveCode.Expressions
{
    class MethodCall<T>: ReactiveExpression
    {
        public ReactiveMethod<T> Callee { get; private set; }
        public MethodCall(ReactiveMethodDefinition<T> callee)
        {
            Contract.Requires(callee != null);
            Callee = callee.Call();
            Callee.Parent = this;
            Callee.BindEnabled(this);
        }
    }
}